<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('login', 'LoginController@show');//登陆
Route::post('action', 'LoginController@action');//提交登录
Route::get('loginOut', 'LoginController@loginOut');//退出登录
Route::get('num_zero','GoodController@num_zero');//随机库存
Route::get('edit_del','GoodController@edit_del');//设置专柜价
Route::middleware('CheckShopLogin')->group(function () {
	Route::get('/', 'IndexController@index');//根
	Route::get('home', 'IndexController@index');//首页
	Route::get('edit', 'IndexController@edit');//首页
	Route::post('edit_pass', 'IndexController@edit_pass');//首页

	Route::get('info', 'IndexController@info');//首页
	Route::any('brand/index', 'BrandController@index');//首页
	Route::get('brand/add', 'BrandController@add');//首页
	Route::post('brand/insert', 'BrandController@insert');//首页
	Route::get('brand/edit', 'BrandController@edit');//首页
	Route::post('brand/update', 'BrandController@update');//首页
	Route::post('brand/del', 'BrandController@del');//删除
	Route::post('brand/synchro','BrandController@synchro');

	Route::any('type/index', 'TypeController@index');//分类列表
	Route::get('type/add', 'TypeController@add');//分类列表添加页
	Route::post('type/insert', 'TypeController@insert');//添加分类
	Route::any('type/add_son', 'TypeController@add_son');//添加子类
	Route::any('type/del', 'TypeController@del');//添加子类
	Route::any('type/edit', 'TypeController@edit');//添加子类
	Route::any('type/update', 'TypeController@update');//添加子类
	Route::any('type/synchro', 'TypeController@synchro');//添加子类
	Route::any('type/display','TypeController@display');//是否在首页显示
	Route::any('type/update_sort','TypeController@update_sort');//编辑分类排序

	Route::any('merchant/index', 'MerchantController@index');//商铺列表
	Route::any('merchant/add', 'MerchantController@add');//添加店铺
	Route::any('merchant/insert', 'MerchantController@insert');//添加店铺
	Route::any('merchant/edit', 'MerchantController@edit');//编辑店铺
	Route::post('merchant/update', 'MerchantController@update');//编辑店铺
	Route::post('merchant/del', 'MerchantController@del');//编辑店铺

	Route::any('good/index','GoodController@index');
	Route::any('good/add','GoodController@add');
	Route::any('good/insert','GoodController@insert');
	Route::any('good/edit','GoodController@edit');
	Route::any('good/update','GoodController@update');
	Route::any('good/type','GoodController@type');
	Route::any('good/type_insert','GoodController@type_insert');
	Route::any('good/type_del','GoodController@type_del');
	Route::any('good/shop','GoodController@shop');
	Route::any('good/shop_add','GoodController@shop_add');
	Route::any('good/shop_insert','GoodController@shop_insert');
	Route::any('good/shop_edit','GoodController@shop_edit');
	Route::any('good/shop_update','GoodController@shop_update');
	Route::any('good/shop_del','GoodController@shop_del');
	Route::any('good/del','GoodController@del');
	Route::any('good/detail','GoodController@detail');
	Route::any('good/synchro','GoodController@synchro');
	Route::any('good/synchro_all','GoodController@synchro_all');
	Route::any('good/chage_price','GoodController@chage_price');
	Route::any('good/chage_num','GoodController@chage_num');
	Route::any('good/chage_del_price','GoodController@chage_del_price');

	Route::any('check_brand','GoodController@check_brand');

	//下架的商品列表
	Route::any('good/index_down','GoodController@index_down');
	//app后台删除的商品列表
	Route::any('good/index_del','GoodController@index_del');
	//下架
	Route::any('good/good_down','GoodController@good_down');
	//上架
	Route::any('good/good_up','GoodController@good_up');
	//删除的商品列表
	Route::any('good/good_del_up','GoodController@good_del_up');

	//随机库存
	Route::any('good/synchro_num','GoodController@synchro_num');
	//同步价格
	Route::any('good/synchro_coin','GoodController@synchro_coin');
	//价格
	Route::any('good/coin','GoodController@chage_price_cy');
	//同步APP后台和货源后台的价格
	Route::any('good/editcy_sell_price','GoodController@editcy_sell_price');
});



